//
//  WDScanCodeButton.m
//  wd-serviceapp
//
//  Created by Bin Tang on 2024/8/7.
//

#import "WDScanCodeButton.h"

@implementation WDScanCodeButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
        [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.titleLabel.font = [UIFont systemFontOfSize:12];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.imageView.frame = CGRectMake((self.frame.size.width - 30)/2, 0, 30, 30);
    self.titleLabel.frame = CGRectMake(0, 30, self.frame.size.width, self.frame.size.height - 30);
}

@end
